package com.itheima.service.Impl;

import com.itheima.mapper.MenuMapper;
import com.itheima.pojo.Bounty;
import com.itheima.pojo.Menu;
import com.itheima.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    private MenuMapper menuMapper;

    //查询所有菜品，菜品列表
    @Override
    public List<Menu> getAllMenu() {
        return menuMapper.getAllMenu();
    }

    @Override
    public void add(Menu menu) {
        menuMapper.add(menu);
    }

    @Override
    public Menu getById(Integer id) {
        return  menuMapper.getById(id);
    }

    @Override
    public void delete(Integer id) {
        menuMapper.delete(id);
    }

    @Override
    public void update(Menu menu ) {
        menuMapper.update(menu);
    }

    @Override
    public List<Menu> getMenuById(Integer id) {
        return menuMapper.getMenuById(id);
    }
}
